using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
using WIT.DAQ.Core.Helper;

namespace WIT.DAQ.Core.Forms;

/// <summary>
///
/// </summary>
internal class SettingForm : BaseForm
{
	/// <summary>
	/// Required designer variable.
	/// </summary>
	private IContainer components = null;

	private CheckBox cbAutoRun;

	private Button btnConfirm;

	private Button btnCancel;

	private CheckBox cbAutoMinimized;

	private TabControl tcSettings;

	private TabPage tabPage1;

	private Panel panel1;

	private TabPage tabPage2;

	private TabPage tabPage4;

	private CheckBox cbAutoSocketServer;

	private CheckBox cbAutoRemoting;

	private CheckBox cbAutoDAQ;

	private NumericUpDown nudTaskTimeout;

	private Label label14;

	private Label label13;

	private Panel panel2;

	private GroupBox groupBox4;

	private NumericUpDown nudOPCUAKeepAliveInterval;

	private Label label19;

	private Label label20;

	private Label label17;

	private Label label18;

	private NumericUpDown nudSocketClientKeepAliveInterval;

	private NumericUpDown nudGCInterval;

	private NumericUpDown nudBAKInterval;

	private Label label12;

	private NumericUpDown nudMonitorInterval;

	private Label label6;

	private Label label11;

	private Label label4;

	private Label label5;

	private NumericUpDown nudPingDeviceInterval;

	private Label label3;

	private Label label2;

	private Label label1;

	private Panel panel3;

	private NumericUpDown nudPingDeviceTimeout;

	private Label label21;

	private Label label22;

	private NumericUpDown nudMonitorGroupSize;

	private CheckBox cbAutoMaximizeMonitor;

	private Label label8;

	private Label label7;

	private TabPage tabPage3;

	private Panel panel4;

	private Label label23;

	private NumericUpDown nudMemoryLogLimit;

	private CheckBox cbAutoMemoryLog;

	private CheckBox cbAutoDelayLog;

	private Label lblMySQLNotice;

	private ComboBox cmbLogSourceType;

	private TextBox txtMySQLConnStr;

	private GroupBox gbConnStr;

	private NumericUpDown nudLogLifetime;

	private Label label9;

	private Label label10;

	private NumericUpDown nudLogLimitCount;

	private Label label16;

	private Label label15;

	private NumericUpDown nudGetMemoryInterval;

	private Label label28;

	private Label label29;

	private Label label27;

	private NumericUpDown nudRestartMemoryLimit;

	private CheckBox cbAutoRestartByMemory;

	private Label label26;

	private NumericUpDown nudRestartInterval;

	private CheckBox cbAutoRestartByInterval;

	/// <summary>
	///
	/// </summary>
	internal SettingForm()
	{
		InitializeComponent();
		InitLogSourceTypes();
	}

	/// <summary>
	/// 加载日志源下拉框数据源
	/// </summary>
	private void InitLogSourceTypes()
	{
		List<object> dataSource = new List<object>
		{
			new
			{
				Value = 1,
				Name = "Sqlite"
			},
			new
			{
				Value = 2,
				Name = "MySQL"
			}
		};
		cmbLogSourceType.ValueMember = "Value";
		cmbLogSourceType.DisplayMember = "Name";
		cmbLogSourceType.DataSource = dataSource;
		cmbLogSourceType.SelectedIndex = 0;
	}

	private void cmbLogSourceType_SelectedIndexChanged(object sender, EventArgs e)
	{
		switch (Convert.ToInt32(cmbLogSourceType.SelectedValue))
		{
		case 1:
			lblMySQLNotice.Visible = false;
			txtMySQLConnStr.Visible = false;
			break;
		case 2:
			lblMySQLNotice.Visible = true;
			txtMySQLConnStr.Visible = true;
			break;
		default:
			throw new Exception("未知的日志源类型");
		}
	}

	private void SettingForm_Load(object sender, EventArgs e)
	{
		XmlDocument xmlDocument = new XmlDocument();
		xmlDocument.Load(Common.SETTING_FILE_FULL_PATH);
		XmlElement documentElement = xmlDocument.DocumentElement;
		XmlElement xmlElement = (XmlElement)documentElement.SelectSingleNode("AutoRun");
		XmlElement xmlElement2 = (XmlElement)documentElement.SelectSingleNode("AutoMinimized");
		XmlElement xmlElement3 = (XmlElement)documentElement.SelectSingleNode("DAQ");
		XmlElement xmlElement4 = (XmlElement)xmlElement3.SelectSingleNode("AutoDAQ");
		XmlElement xmlElement5 = (XmlElement)xmlElement3.SelectSingleNode("TaskTimeout");
		XmlElement xmlElement6 = (XmlElement)xmlElement3.SelectSingleNode("AutoRemoting");
		XmlElement xmlElement7 = (XmlElement)xmlElement3.SelectSingleNode("AutoSocketServer");
		XmlElement xmlElement8 = (XmlElement)documentElement.SelectSingleNode("Interval");
		XmlElement xmlElement9 = (XmlElement)xmlElement8.SelectSingleNode("PingDeviceInterval");
		XmlElement xmlElement10 = (XmlElement)xmlElement8.SelectSingleNode("MonitorInterval");
		XmlElement xmlElement11 = (XmlElement)xmlElement8.SelectSingleNode("GCInterval");
		XmlElement xmlElement12 = (XmlElement)xmlElement8.SelectSingleNode("GetMemoryInterval");
		XmlElement xmlElement13 = (XmlElement)xmlElement8.SelectSingleNode("BAKInterval");
		XmlElement xmlElement14 = (XmlElement)xmlElement8.SelectSingleNode("KeepAlive");
		XmlElement xmlElement15 = (XmlElement)xmlElement14.SelectSingleNode("OPCUA");
		XmlElement xmlElement16 = (XmlElement)xmlElement14.SelectSingleNode("SocketClient");
		XmlElement xmlElement17 = (XmlElement)documentElement.SelectSingleNode("Log");
		if (xmlElement17 == null)
		{
			xmlElement17 = xmlDocument.CreateElement("Log");
			documentElement.InsertAfter(xmlElement17, xmlElement8);
		}
		XmlElement xmlElement18 = (XmlElement)xmlElement17.SelectSingleNode("AutoDelayLog");
		XmlElement xmlElement19 = (XmlElement)xmlElement17.SelectSingleNode("AutoMemoryLog");
		XmlElement xmlElement20 = (XmlElement)xmlElement17.SelectSingleNode("LogSourceType");
		XmlElement xmlElement21 = (XmlElement)xmlElement17.SelectSingleNode("ConnStr");
		XmlElement xmlElement22 = (XmlElement)xmlElement17.SelectSingleNode("LogLifetime");
		XmlElement xmlElement23 = (XmlElement)xmlElement17.SelectSingleNode("LogLimitCount");
		XmlElement xmlElement24 = (XmlElement)documentElement.SelectSingleNode("Other");
		XmlElement xmlElement25 = (XmlElement)xmlElement24.SelectSingleNode("AutoMaximizeMonitor");
		XmlElement xmlElement26 = (XmlElement)xmlElement24.SelectSingleNode("MonitorGroupSize");
		XmlElement xmlElement27 = (XmlElement)xmlElement24.SelectSingleNode("PingDeviceTimeout");
		XmlElement xmlElement28 = (XmlElement)xmlElement24.SelectSingleNode("AutoRestartByInterval");
		XmlElement xmlElement29 = (XmlElement)xmlElement24.SelectSingleNode("AutoRestartByMemory");
		cbAutoRun.Checked = Convert.ToBoolean(xmlElement.InnerText);
		cbAutoMinimized.Checked = xmlElement2 != null && Convert.ToBoolean(xmlElement2.InnerText);
		cbAutoDAQ.Checked = Convert.ToBoolean(xmlElement4.InnerText);
		nudTaskTimeout.Value = Convert.ToInt32(xmlElement5.InnerText);
		cbAutoRemoting.Checked = Convert.ToBoolean(xmlElement6.InnerText);
		cbAutoSocketServer.Checked = Convert.ToBoolean(xmlElement7.InnerText);
		nudPingDeviceInterval.Value = Convert.ToInt32(xmlElement9.InnerText);
		nudMonitorInterval.Value = Convert.ToInt32(xmlElement10.InnerText);
		nudGCInterval.Value = Convert.ToInt32(xmlElement11.InnerText);
		nudGetMemoryInterval.Value = ((xmlElement12 != null) ? Convert.ToInt32(xmlElement12.InnerText) : 60);
		nudBAKInterval.Value = Convert.ToInt32(xmlElement13.InnerText);
		nudOPCUAKeepAliveInterval.Value = Convert.ToInt32(xmlElement15.InnerText);
		nudSocketClientKeepAliveInterval.Value = Convert.ToInt32(xmlElement16.InnerText);
		cbAutoDelayLog.Checked = xmlElement18 != null && Convert.ToBoolean(xmlElement18.InnerText);
		cbAutoMemoryLog.Checked = xmlElement19 != null && Convert.ToBoolean(xmlElement19.InnerText);
		nudMemoryLogLimit.Value = ((xmlElement19 != null) ? Convert.ToInt32(xmlElement19.Attributes["Limit"].Value) : 1024);
		cmbLogSourceType.SelectedValue = ((xmlElement20 == null) ? 1 : Convert.ToInt32(xmlElement20.InnerText));
		txtMySQLConnStr.Text = ((xmlElement21 != null) ? xmlElement21.InnerText : "Data Source=127.0.0.1;Database=daq.log;User Id=root;Password=root;charset=utf8;pooling=true;Allow User Variables=True;SslMode=None;");
		nudLogLifetime.Value = ((xmlElement22 != null) ? Convert.ToInt32(xmlElement22.InnerText) : 7);
		nudLogLimitCount.Value = ((xmlElement23 != null) ? Convert.ToInt32(xmlElement23.InnerText) : 100);
		cbAutoMaximizeMonitor.Checked = Convert.ToBoolean(xmlElement25.InnerText);
		nudMonitorGroupSize.Value = Convert.ToInt32(xmlElement26.InnerText);
		nudPingDeviceTimeout.Value = Convert.ToInt32(xmlElement27.InnerText);
		cbAutoRestartByInterval.Checked = xmlElement28 != null && Convert.ToBoolean(xmlElement28.InnerText);
		nudRestartInterval.Value = ((xmlElement28 != null) ? Convert.ToInt32(xmlElement28.Attributes["Interval"].Value) : 24);
		cbAutoRestartByMemory.Checked = xmlElement29 != null && Convert.ToBoolean(xmlElement29.InnerText);
		nudRestartMemoryLimit.Value = ((xmlElement29 != null) ? Convert.ToInt32(xmlElement29.Attributes["Limit"].Value) : 1024);
	}

	/// <summary>
	/// 确认
	/// </summary>
	/// <param name="sender"></param>
	/// <param name="e"></param>
	private void btnConfirm_Click(object sender, EventArgs e)
	{
		switch (Convert.ToInt32(cmbLogSourceType.SelectedValue))
		{
		case 2:
			if (string.IsNullOrEmpty(txtMySQLConnStr.Text.Trim()))
			{
				MessageBox.Show("请填写数据库连接字符串");
				return;
			}
			break;
		default:
			throw new Exception("未知的日志源类型");
		case 1:
			break;
		}
		XmlDocument xmlDocument = new XmlDocument();
		xmlDocument.Load(Common.SETTING_FILE_FULL_PATH);
		XmlElement documentElement = xmlDocument.DocumentElement;
		XmlElement xmlElement = (XmlElement)documentElement.SelectSingleNode("AutoRun");
		XmlElement xmlElement2 = (XmlElement)documentElement.SelectSingleNode("AutoMinimized");
		XmlElement xmlElement3 = (XmlElement)documentElement.SelectSingleNode("DAQ");
		XmlElement xmlElement4 = (XmlElement)xmlElement3.SelectSingleNode("AutoDAQ");
		XmlElement xmlElement5 = (XmlElement)xmlElement3.SelectSingleNode("TaskTimeout");
		XmlElement xmlElement6 = (XmlElement)xmlElement3.SelectSingleNode("AutoRemoting");
		XmlElement xmlElement7 = (XmlElement)xmlElement3.SelectSingleNode("AutoSocketServer");
		XmlElement xmlElement8 = (XmlElement)documentElement.SelectSingleNode("Interval");
		XmlElement xmlElement9 = (XmlElement)xmlElement8.SelectSingleNode("PingDeviceInterval");
		XmlElement xmlElement10 = (XmlElement)xmlElement8.SelectSingleNode("MonitorInterval");
		XmlElement xmlElement11 = (XmlElement)xmlElement8.SelectSingleNode("GCInterval");
		XmlElement xmlElement12 = (XmlElement)xmlElement8.SelectSingleNode("GetMemoryInterval");
		XmlElement xmlElement13 = (XmlElement)xmlElement8.SelectSingleNode("BAKInterval");
		XmlElement xmlElement14 = (XmlElement)xmlElement8.SelectSingleNode("KeepAlive");
		XmlElement xmlElement15 = (XmlElement)xmlElement14.SelectSingleNode("OPCUA");
		XmlElement xmlElement16 = (XmlElement)xmlElement14.SelectSingleNode("SocketClient");
		XmlElement xmlElement17 = (XmlElement)documentElement.SelectSingleNode("Log");
		if (xmlElement17 == null)
		{
			xmlElement17 = xmlDocument.CreateElement("Log");
			documentElement.InsertAfter(xmlElement17, xmlElement8);
		}
		XmlElement xmlElement18 = (XmlElement)xmlElement17.SelectSingleNode("AutoDelayLog");
		XmlElement xmlElement19 = (XmlElement)xmlElement17.SelectSingleNode("AutoMemoryLog");
		XmlElement xmlElement20 = (XmlElement)xmlElement17.SelectSingleNode("LogSourceType");
		XmlElement xmlElement21 = (XmlElement)xmlElement17.SelectSingleNode("ConnStr");
		XmlElement xmlElement22 = (XmlElement)xmlElement17.SelectSingleNode("LogLifetime");
		XmlElement xmlElement23 = (XmlElement)xmlElement17.SelectSingleNode("LogLimitCount");
		XmlElement xmlElement24 = (XmlElement)documentElement.SelectSingleNode("Other");
		XmlElement xmlElement25 = (XmlElement)xmlElement24.SelectSingleNode("AutoMaximizeMonitor");
		XmlElement xmlElement26 = (XmlElement)xmlElement24.SelectSingleNode("MonitorGroupSize");
		XmlElement xmlElement27 = (XmlElement)xmlElement24.SelectSingleNode("PingDeviceTimeout");
		XmlElement xmlElement28 = (XmlElement)xmlElement24.SelectSingleNode("AutoRestartByInterval");
		XmlElement xmlElement29 = (XmlElement)xmlElement24.SelectSingleNode("AutoRestartByMemory");
		xmlElement.InnerText = cbAutoRun.Checked.ToString();
		if (xmlElement2 == null)
		{
			xmlElement2 = xmlDocument.CreateElement("AutoMinimized");
			documentElement.InsertAfter(xmlElement2, xmlElement);
		}
		xmlElement2.InnerText = cbAutoMinimized.Checked.ToString();
		xmlElement4.InnerText = cbAutoDAQ.Checked.ToString();
		xmlElement5.InnerText = nudTaskTimeout.Value.ToString();
		xmlElement6.InnerText = cbAutoRemoting.Checked.ToString();
		xmlElement7.InnerText = cbAutoSocketServer.Checked.ToString();
		xmlElement9.InnerText = nudPingDeviceInterval.Value.ToString();
		xmlElement10.InnerText = nudMonitorInterval.Value.ToString();
		xmlElement11.InnerText = nudGCInterval.Value.ToString();
		if (xmlElement12 == null)
		{
			xmlElement12 = xmlDocument.CreateElement("GetMemoryInterval");
			xmlElement8.InsertAfter(xmlElement12, xmlElement11);
		}
		xmlElement12.InnerText = nudGetMemoryInterval.Value.ToString();
		xmlElement15.InnerText = nudOPCUAKeepAliveInterval.Value.ToString();
		xmlElement16.InnerText = nudSocketClientKeepAliveInterval.Value.ToString();
		xmlElement13.InnerText = nudBAKInterval.Value.ToString();
		if (xmlElement18 == null)
		{
			xmlElement18 = xmlDocument.CreateElement("AutoDelayLog");
			xmlElement17.AppendChild(xmlElement18);
		}
		xmlElement18.InnerText = cbAutoDelayLog.Checked.ToString();
		if (xmlElement19 == null)
		{
			xmlElement19 = xmlDocument.CreateElement("AutoMemoryLog");
			xmlElement19.SetAttribute("Limit", nudMemoryLogLimit.Value.ToString());
			xmlElement17.InsertAfter(xmlElement19, xmlElement18);
		}
		else
		{
			xmlElement19.Attributes["Limit"].Value = nudMemoryLogLimit.Value.ToString();
		}
		xmlElement19.InnerText = cbAutoMemoryLog.Checked.ToString();
		if (xmlElement20 == null)
		{
			xmlElement20 = xmlDocument.CreateElement("LogSourceType");
			xmlElement17.InsertAfter(xmlElement20, xmlElement19);
		}
		xmlElement20.InnerText = cmbLogSourceType.SelectedValue.ToString();
		if (xmlElement21 == null)
		{
			xmlElement21 = xmlDocument.CreateElement("ConnStr");
			xmlElement17.InsertAfter(xmlElement21, xmlElement20);
		}
		xmlElement21.InnerText = txtMySQLConnStr.Text.Trim();
		if (xmlElement22 == null)
		{
			xmlElement22 = xmlDocument.CreateElement("LogLifetime");
			xmlElement17.InsertAfter(xmlElement22, xmlElement21);
		}
		xmlElement22.InnerText = nudLogLifetime.Value.ToString();
		if (xmlElement23 == null)
		{
			xmlElement23 = xmlDocument.CreateElement("LimitCount");
			xmlElement17.InsertAfter(xmlElement23, xmlElement22);
		}
		xmlElement23.InnerText = nudLogLimitCount.Value.ToString();
		xmlElement25.InnerText = cbAutoMaximizeMonitor.Checked.ToString();
		xmlElement26.InnerText = nudMonitorGroupSize.Value.ToString();
		xmlElement27.InnerText = nudPingDeviceTimeout.Value.ToString();
		if (xmlElement28 == null)
		{
			xmlElement28 = xmlDocument.CreateElement("AutoRestartByInterval");
			xmlElement28.SetAttribute("Interval", nudRestartInterval.Value.ToString());
			xmlElement24.InsertAfter(xmlElement28, xmlElement27);
		}
		else
		{
			xmlElement28.Attributes["Interval"].Value = nudRestartInterval.Value.ToString();
		}
		xmlElement28.InnerText = cbAutoRestartByInterval.Checked.ToString();
		if (xmlElement29 == null)
		{
			xmlElement29 = xmlDocument.CreateElement("AutoRestartByMemory");
			xmlElement29.SetAttribute("Limit", nudRestartMemoryLimit.Value.ToString());
			xmlElement24.InsertAfter(xmlElement29, xmlElement28);
		}
		else
		{
			xmlElement29.Attributes["Limit"].Value = nudRestartMemoryLimit.Value.ToString();
		}
		xmlElement29.InnerText = cbAutoRestartByMemory.Checked.ToString();
		xmlDocument.Save(Common.SETTING_FILE_FULL_PATH);
		WinformHelper.AutoRun(cbAutoRun.Checked, "WIT.DAQ");
		Close();
	}

	/// <summary>
	/// 关闭
	/// </summary>
	/// <param name="sender"></param>
	/// <param name="e"></param>
	private void btnCancel_Click(object sender, EventArgs e)
	{
		Close();
	}

	/// <summary>
	/// ESC关闭
	/// </summary>
	/// <param name="sender"></param>
	/// <param name="e"></param>
	private void SettingForm_KeyDown(object sender, KeyEventArgs e)
	{
		if (e.KeyCode == Keys.Escape)
		{
			btnCancel_Click(null, null);
		}
	}

	/// <summary>
	/// Clean up any resources being used.
	/// </summary>
	/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	/// <summary>
	/// Required method for Designer support - do not modify
	/// the contents of this method with the code editor.
	/// </summary>
	private void InitializeComponent()
	{
		this.cbAutoRun = new System.Windows.Forms.CheckBox();
		this.btnConfirm = new System.Windows.Forms.Button();
		this.btnCancel = new System.Windows.Forms.Button();
		this.cbAutoMinimized = new System.Windows.Forms.CheckBox();
		this.tcSettings = new System.Windows.Forms.TabControl();
		this.tabPage1 = new System.Windows.Forms.TabPage();
		this.panel1 = new System.Windows.Forms.Panel();
		this.cbAutoSocketServer = new System.Windows.Forms.CheckBox();
		this.cbAutoRemoting = new System.Windows.Forms.CheckBox();
		this.cbAutoDAQ = new System.Windows.Forms.CheckBox();
		this.nudTaskTimeout = new System.Windows.Forms.NumericUpDown();
		this.label14 = new System.Windows.Forms.Label();
		this.label13 = new System.Windows.Forms.Label();
		this.tabPage2 = new System.Windows.Forms.TabPage();
		this.panel2 = new System.Windows.Forms.Panel();
		this.nudGetMemoryInterval = new System.Windows.Forms.NumericUpDown();
		this.label28 = new System.Windows.Forms.Label();
		this.label29 = new System.Windows.Forms.Label();
		this.groupBox4 = new System.Windows.Forms.GroupBox();
		this.nudOPCUAKeepAliveInterval = new System.Windows.Forms.NumericUpDown();
		this.label19 = new System.Windows.Forms.Label();
		this.label20 = new System.Windows.Forms.Label();
		this.label17 = new System.Windows.Forms.Label();
		this.label18 = new System.Windows.Forms.Label();
		this.nudSocketClientKeepAliveInterval = new System.Windows.Forms.NumericUpDown();
		this.nudGCInterval = new System.Windows.Forms.NumericUpDown();
		this.nudBAKInterval = new System.Windows.Forms.NumericUpDown();
		this.label12 = new System.Windows.Forms.Label();
		this.nudMonitorInterval = new System.Windows.Forms.NumericUpDown();
		this.label6 = new System.Windows.Forms.Label();
		this.label11 = new System.Windows.Forms.Label();
		this.label4 = new System.Windows.Forms.Label();
		this.label5 = new System.Windows.Forms.Label();
		this.nudPingDeviceInterval = new System.Windows.Forms.NumericUpDown();
		this.label3 = new System.Windows.Forms.Label();
		this.label2 = new System.Windows.Forms.Label();
		this.label1 = new System.Windows.Forms.Label();
		this.tabPage3 = new System.Windows.Forms.TabPage();
		this.panel4 = new System.Windows.Forms.Panel();
		this.nudLogLifetime = new System.Windows.Forms.NumericUpDown();
		this.label9 = new System.Windows.Forms.Label();
		this.label10 = new System.Windows.Forms.Label();
		this.nudLogLimitCount = new System.Windows.Forms.NumericUpDown();
		this.label16 = new System.Windows.Forms.Label();
		this.label15 = new System.Windows.Forms.Label();
		this.gbConnStr = new System.Windows.Forms.GroupBox();
		this.txtMySQLConnStr = new System.Windows.Forms.TextBox();
		this.lblMySQLNotice = new System.Windows.Forms.Label();
		this.cmbLogSourceType = new System.Windows.Forms.ComboBox();
		this.label23 = new System.Windows.Forms.Label();
		this.nudMemoryLogLimit = new System.Windows.Forms.NumericUpDown();
		this.cbAutoMemoryLog = new System.Windows.Forms.CheckBox();
		this.cbAutoDelayLog = new System.Windows.Forms.CheckBox();
		this.tabPage4 = new System.Windows.Forms.TabPage();
		this.panel3 = new System.Windows.Forms.Panel();
		this.label27 = new System.Windows.Forms.Label();
		this.nudRestartMemoryLimit = new System.Windows.Forms.NumericUpDown();
		this.cbAutoRestartByMemory = new System.Windows.Forms.CheckBox();
		this.label26 = new System.Windows.Forms.Label();
		this.nudRestartInterval = new System.Windows.Forms.NumericUpDown();
		this.cbAutoRestartByInterval = new System.Windows.Forms.CheckBox();
		this.nudPingDeviceTimeout = new System.Windows.Forms.NumericUpDown();
		this.label21 = new System.Windows.Forms.Label();
		this.label22 = new System.Windows.Forms.Label();
		this.nudMonitorGroupSize = new System.Windows.Forms.NumericUpDown();
		this.cbAutoMaximizeMonitor = new System.Windows.Forms.CheckBox();
		this.label8 = new System.Windows.Forms.Label();
		this.label7 = new System.Windows.Forms.Label();
		this.tcSettings.SuspendLayout();
		this.tabPage1.SuspendLayout();
		this.panel1.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.nudTaskTimeout).BeginInit();
		this.tabPage2.SuspendLayout();
		this.panel2.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.nudGetMemoryInterval).BeginInit();
		this.groupBox4.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.nudOPCUAKeepAliveInterval).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudSocketClientKeepAliveInterval).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudGCInterval).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudBAKInterval).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudMonitorInterval).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudPingDeviceInterval).BeginInit();
		this.tabPage3.SuspendLayout();
		this.panel4.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.nudLogLifetime).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudLogLimitCount).BeginInit();
		this.gbConnStr.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.nudMemoryLogLimit).BeginInit();
		this.tabPage4.SuspendLayout();
		this.panel3.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.nudRestartMemoryLimit).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudRestartInterval).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudPingDeviceTimeout).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudMonitorGroupSize).BeginInit();
		base.SuspendLayout();
		this.cbAutoRun.AutoSize = true;
		this.cbAutoRun.Location = new System.Drawing.Point(16, 28);
		this.cbAutoRun.Name = "cbAutoRun";
		this.cbAutoRun.Size = new System.Drawing.Size(96, 16);
		this.cbAutoRun.TabIndex = 0;
		this.cbAutoRun.Text = "程序开机启动";
		this.cbAutoRun.UseVisualStyleBackColor = true;
		this.btnConfirm.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
		this.btnConfirm.Location = new System.Drawing.Point(306, 362);
		this.btnConfirm.Name = "btnConfirm";
		this.btnConfirm.Size = new System.Drawing.Size(75, 23);
		this.btnConfirm.TabIndex = 3;
		this.btnConfirm.Text = "确认(&S)";
		this.btnConfirm.UseVisualStyleBackColor = true;
		this.btnConfirm.Click += new System.EventHandler(btnConfirm_Click);
		this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
		this.btnCancel.Location = new System.Drawing.Point(387, 362);
		this.btnCancel.Name = "btnCancel";
		this.btnCancel.Size = new System.Drawing.Size(75, 23);
		this.btnCancel.TabIndex = 4;
		this.btnCancel.Text = "取消(&C)";
		this.btnCancel.UseVisualStyleBackColor = true;
		this.btnCancel.Click += new System.EventHandler(btnCancel_Click);
		this.cbAutoMinimized.AutoSize = true;
		this.cbAutoMinimized.Location = new System.Drawing.Point(16, 50);
		this.cbAutoMinimized.Name = "cbAutoMinimized";
		this.cbAutoMinimized.Size = new System.Drawing.Size(120, 16);
		this.cbAutoMinimized.TabIndex = 1;
		this.cbAutoMinimized.Text = "程序开启后最小化";
		this.cbAutoMinimized.UseVisualStyleBackColor = true;
		this.tcSettings.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.tcSettings.Controls.Add(this.tabPage1);
		this.tcSettings.Controls.Add(this.tabPage2);
		this.tcSettings.Controls.Add(this.tabPage3);
		this.tcSettings.Controls.Add(this.tabPage4);
		this.tcSettings.Location = new System.Drawing.Point(12, 82);
		this.tcSettings.Name = "tcSettings";
		this.tcSettings.SelectedIndex = 0;
		this.tcSettings.Size = new System.Drawing.Size(450, 274);
		this.tcSettings.TabIndex = 2;
		this.tabPage1.BackColor = System.Drawing.SystemColors.Control;
		this.tabPage1.Controls.Add(this.panel1);
		this.tabPage1.Location = new System.Drawing.Point(4, 22);
		this.tabPage1.Name = "tabPage1";
		this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
		this.tabPage1.Size = new System.Drawing.Size(442, 248);
		this.tabPage1.TabIndex = 0;
		this.tabPage1.Text = "数据采集设置";
		this.panel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.panel1.Controls.Add(this.cbAutoSocketServer);
		this.panel1.Controls.Add(this.cbAutoRemoting);
		this.panel1.Controls.Add(this.cbAutoDAQ);
		this.panel1.Controls.Add(this.nudTaskTimeout);
		this.panel1.Controls.Add(this.label14);
		this.panel1.Controls.Add(this.label13);
		this.panel1.Location = new System.Drawing.Point(20, 20);
		this.panel1.Name = "panel1";
		this.panel1.Size = new System.Drawing.Size(400, 222);
		this.panel1.TabIndex = 0;
		this.cbAutoSocketServer.AutoSize = true;
		this.cbAutoSocketServer.Location = new System.Drawing.Point(3, 74);
		this.cbAutoSocketServer.Name = "cbAutoSocketServer";
		this.cbAutoSocketServer.Size = new System.Drawing.Size(132, 16);
		this.cbAutoSocketServer.TabIndex = 4;
		this.cbAutoSocketServer.Text = "自动开启Socket服务";
		this.cbAutoSocketServer.UseVisualStyleBackColor = true;
		this.cbAutoRemoting.AutoSize = true;
		this.cbAutoRemoting.Location = new System.Drawing.Point(3, 52);
		this.cbAutoRemoting.Name = "cbAutoRemoting";
		this.cbAutoRemoting.Size = new System.Drawing.Size(120, 16);
		this.cbAutoRemoting.TabIndex = 3;
		this.cbAutoRemoting.Text = "自动开启远程服务";
		this.cbAutoRemoting.UseVisualStyleBackColor = true;
		this.cbAutoDAQ.AutoSize = true;
		this.cbAutoDAQ.Location = new System.Drawing.Point(3, 3);
		this.cbAutoDAQ.Name = "cbAutoDAQ";
		this.cbAutoDAQ.Size = new System.Drawing.Size(120, 16);
		this.cbAutoDAQ.TabIndex = 0;
		this.cbAutoDAQ.Text = "自动开始数据采集";
		this.cbAutoDAQ.UseVisualStyleBackColor = true;
		this.nudTaskTimeout.Location = new System.Drawing.Point(92, 25);
		this.nudTaskTimeout.Maximum = new decimal(new int[4] { 60, 0, 0, 0 });
		this.nudTaskTimeout.Minimum = new decimal(new int[4] { 3, 0, 0, 0 });
		this.nudTaskTimeout.Name = "nudTaskTimeout";
		this.nudTaskTimeout.Size = new System.Drawing.Size(40, 21);
		this.nudTaskTimeout.TabIndex = 2;
		this.nudTaskTimeout.Value = new decimal(new int[4] { 10, 0, 0, 0 });
		this.label14.AutoSize = true;
		this.label14.Location = new System.Drawing.Point(135, 29);
		this.label14.Name = "label14";
		this.label14.Size = new System.Drawing.Size(41, 12);
		this.label14.TabIndex = 3;
		this.label14.Text = "秒超时";
		this.label13.AutoSize = true;
		this.label13.Location = new System.Drawing.Point(1, 29);
		this.label13.Name = "label13";
		this.label13.Size = new System.Drawing.Size(89, 12);
		this.label13.TabIndex = 1;
		this.label13.Text = "自动执行任务时";
		this.tabPage2.BackColor = System.Drawing.SystemColors.Control;
		this.tabPage2.Controls.Add(this.panel2);
		this.tabPage2.Location = new System.Drawing.Point(4, 22);
		this.tabPage2.Name = "tabPage2";
		this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
		this.tabPage2.Size = new System.Drawing.Size(442, 248);
		this.tabPage2.TabIndex = 1;
		this.tabPage2.Text = "频率设置";
		this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.panel2.Controls.Add(this.nudGetMemoryInterval);
		this.panel2.Controls.Add(this.label28);
		this.panel2.Controls.Add(this.label29);
		this.panel2.Controls.Add(this.groupBox4);
		this.panel2.Controls.Add(this.nudGCInterval);
		this.panel2.Controls.Add(this.nudBAKInterval);
		this.panel2.Controls.Add(this.label12);
		this.panel2.Controls.Add(this.nudMonitorInterval);
		this.panel2.Controls.Add(this.label6);
		this.panel2.Controls.Add(this.label11);
		this.panel2.Controls.Add(this.label4);
		this.panel2.Controls.Add(this.label5);
		this.panel2.Controls.Add(this.nudPingDeviceInterval);
		this.panel2.Controls.Add(this.label3);
		this.panel2.Controls.Add(this.label2);
		this.panel2.Controls.Add(this.label1);
		this.panel2.Location = new System.Drawing.Point(20, 20);
		this.panel2.Name = "panel2";
		this.panel2.Size = new System.Drawing.Size(400, 222);
		this.panel2.TabIndex = 1;
		this.nudGetMemoryInterval.Location = new System.Drawing.Point(134, 84);
		this.nudGetMemoryInterval.Maximum = new decimal(new int[4] { 3600, 0, 0, 0 });
		this.nudGetMemoryInterval.Minimum = new decimal(new int[4] { 10, 0, 0, 0 });
		this.nudGetMemoryInterval.Name = "nudGetMemoryInterval";
		this.nudGetMemoryInterval.Size = new System.Drawing.Size(80, 21);
		this.nudGetMemoryInterval.TabIndex = 3;
		this.nudGetMemoryInterval.Value = new decimal(new int[4] { 60, 0, 0, 0 });
		this.label28.AutoSize = true;
		this.label28.Location = new System.Drawing.Point(220, 88);
		this.label28.Name = "label28";
		this.label28.Size = new System.Drawing.Size(11, 12);
		this.label28.TabIndex = 15;
		this.label28.Text = "s";
		this.label29.AutoSize = true;
		this.label29.Location = new System.Drawing.Point(3, 88);
		this.label29.Name = "label29";
		this.label29.Size = new System.Drawing.Size(125, 12);
		this.label29.TabIndex = 16;
		this.label29.Text = "判断内存占用的频率：";
		this.groupBox4.Controls.Add(this.nudOPCUAKeepAliveInterval);
		this.groupBox4.Controls.Add(this.label19);
		this.groupBox4.Controls.Add(this.label20);
		this.groupBox4.Controls.Add(this.label17);
		this.groupBox4.Controls.Add(this.label18);
		this.groupBox4.Controls.Add(this.nudSocketClientKeepAliveInterval);
		this.groupBox4.Location = new System.Drawing.Point(5, 138);
		this.groupBox4.Name = "groupBox4";
		this.groupBox4.Size = new System.Drawing.Size(232, 83);
		this.groupBox4.TabIndex = 5;
		this.groupBox4.TabStop = false;
		this.groupBox4.Text = "KeepAlive频率";
		this.nudOPCUAKeepAliveInterval.Increment = new decimal(new int[4] { 100, 0, 0, 0 });
		this.nudOPCUAKeepAliveInterval.Location = new System.Drawing.Point(129, 22);
		this.nudOPCUAKeepAliveInterval.Maximum = new decimal(new int[4] { 60000, 0, 0, 0 });
		this.nudOPCUAKeepAliveInterval.Minimum = new decimal(new int[4] { 1000, 0, 0, 0 });
		this.nudOPCUAKeepAliveInterval.Name = "nudOPCUAKeepAliveInterval";
		this.nudOPCUAKeepAliveInterval.Size = new System.Drawing.Size(80, 21);
		this.nudOPCUAKeepAliveInterval.TabIndex = 0;
		this.nudOPCUAKeepAliveInterval.Value = new decimal(new int[4] { 1000, 0, 0, 0 });
		this.label19.AutoSize = true;
		this.label19.Location = new System.Drawing.Point(212, 22);
		this.label19.Name = "label19";
		this.label19.Size = new System.Drawing.Size(17, 12);
		this.label19.TabIndex = 0;
		this.label19.Text = "ms";
		this.label20.AutoSize = true;
		this.label20.Location = new System.Drawing.Point(212, 49);
		this.label20.Name = "label20";
		this.label20.Size = new System.Drawing.Size(17, 12);
		this.label20.TabIndex = 0;
		this.label20.Text = "ms";
		this.label17.AutoSize = true;
		this.label17.Location = new System.Drawing.Point(76, 24);
		this.label17.Name = "label17";
		this.label17.Size = new System.Drawing.Size(47, 12);
		this.label17.TabIndex = 0;
		this.label17.Text = "OPCUA：";
		this.label18.AutoSize = true;
		this.label18.Location = new System.Drawing.Point(34, 51);
		this.label18.Name = "label18";
		this.label18.Size = new System.Drawing.Size(89, 12);
		this.label18.TabIndex = 0;
		this.label18.Text = "SocketClient：";
		this.nudSocketClientKeepAliveInterval.Increment = new decimal(new int[4] { 100, 0, 0, 0 });
		this.nudSocketClientKeepAliveInterval.Location = new System.Drawing.Point(129, 49);
		this.nudSocketClientKeepAliveInterval.Maximum = new decimal(new int[4] { 60000, 0, 0, 0 });
		this.nudSocketClientKeepAliveInterval.Minimum = new decimal(new int[4] { 500, 0, 0, 0 });
		this.nudSocketClientKeepAliveInterval.Name = "nudSocketClientKeepAliveInterval";
		this.nudSocketClientKeepAliveInterval.Size = new System.Drawing.Size(80, 21);
		this.nudSocketClientKeepAliveInterval.TabIndex = 1;
		this.nudSocketClientKeepAliveInterval.Value = new decimal(new int[4] { 1000, 0, 0, 0 });
		this.nudGCInterval.Location = new System.Drawing.Point(134, 57);
		this.nudGCInterval.Maximum = new decimal(new int[4] { 1440, 0, 0, 0 });
		this.nudGCInterval.Name = "nudGCInterval";
		this.nudGCInterval.Size = new System.Drawing.Size(80, 21);
		this.nudGCInterval.TabIndex = 2;
		this.nudBAKInterval.Location = new System.Drawing.Point(134, 111);
		this.nudBAKInterval.Maximum = new decimal(new int[4] { 30, 0, 0, 0 });
		this.nudBAKInterval.Minimum = new decimal(new int[4] { 1, 0, 0, 0 });
		this.nudBAKInterval.Name = "nudBAKInterval";
		this.nudBAKInterval.Size = new System.Drawing.Size(80, 21);
		this.nudBAKInterval.TabIndex = 4;
		this.nudBAKInterval.Value = new decimal(new int[4] { 1, 0, 0, 0 });
		this.label12.AutoSize = true;
		this.label12.Location = new System.Drawing.Point(220, 61);
		this.label12.Name = "label12";
		this.label12.Size = new System.Drawing.Size(23, 12);
		this.label12.TabIndex = 5;
		this.label12.Text = "min";
		this.nudMonitorInterval.Increment = new decimal(new int[4] { 100, 0, 0, 0 });
		this.nudMonitorInterval.Location = new System.Drawing.Point(134, 30);
		this.nudMonitorInterval.Maximum = new decimal(new int[4] { 600000, 0, 0, 0 });
		this.nudMonitorInterval.Minimum = new decimal(new int[4] { 100, 0, 0, 0 });
		this.nudMonitorInterval.Name = "nudMonitorInterval";
		this.nudMonitorInterval.Size = new System.Drawing.Size(80, 21);
		this.nudMonitorInterval.TabIndex = 1;
		this.nudMonitorInterval.Value = new decimal(new int[4] { 1000, 0, 0, 0 });
		this.label6.AutoSize = true;
		this.label6.Location = new System.Drawing.Point(220, 115);
		this.label6.Name = "label6";
		this.label6.Size = new System.Drawing.Size(23, 12);
		this.label6.TabIndex = 6;
		this.label6.Text = "day";
		this.label11.AutoSize = true;
		this.label11.Location = new System.Drawing.Point(27, 61);
		this.label11.Name = "label11";
		this.label11.Size = new System.Drawing.Size(101, 12);
		this.label11.TabIndex = 7;
		this.label11.Text = "内存回收的频率：";
		this.label4.AutoSize = true;
		this.label4.Location = new System.Drawing.Point(220, 34);
		this.label4.Name = "label4";
		this.label4.Size = new System.Drawing.Size(17, 12);
		this.label4.TabIndex = 8;
		this.label4.Text = "ms";
		this.label5.AutoSize = true;
		this.label5.Location = new System.Drawing.Point(3, 115);
		this.label5.Name = "label5";
		this.label5.Size = new System.Drawing.Size(125, 12);
		this.label5.TabIndex = 9;
		this.label5.Text = "备份配置文件的频率：";
		this.nudPingDeviceInterval.Increment = new decimal(new int[4] { 100, 0, 0, 0 });
		this.nudPingDeviceInterval.Location = new System.Drawing.Point(134, 3);
		this.nudPingDeviceInterval.Maximum = new decimal(new int[4] { 600000, 0, 0, 0 });
		this.nudPingDeviceInterval.Minimum = new decimal(new int[4] { 100, 0, 0, 0 });
		this.nudPingDeviceInterval.Name = "nudPingDeviceInterval";
		this.nudPingDeviceInterval.Size = new System.Drawing.Size(80, 21);
		this.nudPingDeviceInterval.TabIndex = 0;
		this.nudPingDeviceInterval.Value = new decimal(new int[4] { 1000, 0, 0, 0 });
		this.label3.AutoSize = true;
		this.label3.Location = new System.Drawing.Point(27, 34);
		this.label3.Name = "label3";
		this.label3.Size = new System.Drawing.Size(101, 12);
		this.label3.TabIndex = 11;
		this.label3.Text = "实时监控的频率：";
		this.label2.AutoSize = true;
		this.label2.Location = new System.Drawing.Point(220, 7);
		this.label2.Name = "label2";
		this.label2.Size = new System.Drawing.Size(17, 12);
		this.label2.TabIndex = 12;
		this.label2.Text = "ms";
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(15, 7);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(113, 12);
		this.label1.TabIndex = 13;
		this.label1.Text = "Ping设备IP的频率：";
		this.tabPage3.BackColor = System.Drawing.SystemColors.Control;
		this.tabPage3.Controls.Add(this.panel4);
		this.tabPage3.Location = new System.Drawing.Point(4, 22);
		this.tabPage3.Name = "tabPage3";
		this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
		this.tabPage3.Size = new System.Drawing.Size(442, 248);
		this.tabPage3.TabIndex = 3;
		this.tabPage3.Text = "日志";
		this.panel4.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.panel4.Controls.Add(this.nudLogLifetime);
		this.panel4.Controls.Add(this.label9);
		this.panel4.Controls.Add(this.label10);
		this.panel4.Controls.Add(this.nudLogLimitCount);
		this.panel4.Controls.Add(this.label16);
		this.panel4.Controls.Add(this.label15);
		this.panel4.Controls.Add(this.gbConnStr);
		this.panel4.Controls.Add(this.label23);
		this.panel4.Controls.Add(this.nudMemoryLogLimit);
		this.panel4.Controls.Add(this.cbAutoMemoryLog);
		this.panel4.Controls.Add(this.cbAutoDelayLog);
		this.panel4.Location = new System.Drawing.Point(20, 20);
		this.panel4.Name = "panel4";
		this.panel4.Size = new System.Drawing.Size(400, 222);
		this.panel4.TabIndex = 1;
		this.nudLogLifetime.Location = new System.Drawing.Point(59, 157);
		this.nudLogLifetime.Maximum = new decimal(new int[4] { 365, 0, 0, 0 });
		this.nudLogLifetime.Minimum = new decimal(new int[4] { 1, 0, 0, 0 });
		this.nudLogLifetime.Name = "nudLogLifetime";
		this.nudLogLifetime.Size = new System.Drawing.Size(43, 21);
		this.nudLogLifetime.TabIndex = 5;
		this.nudLogLifetime.Value = new decimal(new int[4] { 7, 0, 0, 0 });
		this.label9.AutoSize = true;
		this.label9.Location = new System.Drawing.Point(105, 161);
		this.label9.Name = "label9";
		this.label9.Size = new System.Drawing.Size(53, 12);
		this.label9.TabIndex = 15;
		this.label9.Text = "天的日志";
		this.label10.AutoSize = true;
		this.label10.Location = new System.Drawing.Point(3, 161);
		this.label10.Name = "label10";
		this.label10.Size = new System.Drawing.Size(53, 12);
		this.label10.TabIndex = 13;
		this.label10.Text = "保留最近";
		this.nudLogLimitCount.Increment = new decimal(new int[4] { 10, 0, 0, 0 });
		this.nudLogLimitCount.Location = new System.Drawing.Point(59, 184);
		this.nudLogLimitCount.Maximum = new decimal(new int[4] { 9999, 0, 0, 0 });
		this.nudLogLimitCount.Minimum = new decimal(new int[4] { 10, 0, 0, 0 });
		this.nudLogLimitCount.Name = "nudLogLimitCount";
		this.nudLogLimitCount.Size = new System.Drawing.Size(43, 21);
		this.nudLogLimitCount.TabIndex = 6;
		this.nudLogLimitCount.Value = new decimal(new int[4] { 100, 0, 0, 0 });
		this.label16.AutoSize = true;
		this.label16.Location = new System.Drawing.Point(105, 188);
		this.label16.Name = "label16";
		this.label16.Size = new System.Drawing.Size(41, 12);
		this.label16.TabIndex = 12;
		this.label16.Text = "条日志";
		this.label15.AutoSize = true;
		this.label15.Location = new System.Drawing.Point(3, 188);
		this.label15.Name = "label15";
		this.label15.Size = new System.Drawing.Size(53, 12);
		this.label15.TabIndex = 10;
		this.label15.Text = "最多查询";
		this.gbConnStr.Controls.Add(this.txtMySQLConnStr);
		this.gbConnStr.Controls.Add(this.lblMySQLNotice);
		this.gbConnStr.Controls.Add(this.cmbLogSourceType);
		this.gbConnStr.Location = new System.Drawing.Point(3, 50);
		this.gbConnStr.Name = "gbConnStr";
		this.gbConnStr.Size = new System.Drawing.Size(394, 101);
		this.gbConnStr.TabIndex = 4;
		this.gbConnStr.TabStop = false;
		this.gbConnStr.Text = "日志源（修改后需要重新启动程序）";
		this.txtMySQLConnStr.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.txtMySQLConnStr.Location = new System.Drawing.Point(6, 59);
		this.txtMySQLConnStr.Name = "txtMySQLConnStr";
		this.txtMySQLConnStr.Size = new System.Drawing.Size(382, 21);
		this.txtMySQLConnStr.TabIndex = 1;
		this.txtMySQLConnStr.Visible = false;
		this.lblMySQLNotice.AutoSize = true;
		this.lblMySQLNotice.ForeColor = System.Drawing.Color.Red;
		this.lblMySQLNotice.Location = new System.Drawing.Point(133, 39);
		this.lblMySQLNotice.Name = "lblMySQLNotice";
		this.lblMySQLNotice.Size = new System.Drawing.Size(191, 12);
		this.lblMySQLNotice.TabIndex = 1;
		this.lblMySQLNotice.Text = "选择Mysql时需要填写连接字符串↓";
		this.lblMySQLNotice.Visible = false;
		this.cmbLogSourceType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
		this.cmbLogSourceType.FormattingEnabled = true;
		this.cmbLogSourceType.Location = new System.Drawing.Point(6, 33);
		this.cmbLogSourceType.Name = "cmbLogSourceType";
		this.cmbLogSourceType.Size = new System.Drawing.Size(121, 20);
		this.cmbLogSourceType.TabIndex = 0;
		this.cmbLogSourceType.SelectedIndexChanged += new System.EventHandler(cmbLogSourceType_SelectedIndexChanged);
		this.label23.AutoSize = true;
		this.label23.Location = new System.Drawing.Point(152, 27);
		this.label23.Name = "label23";
		this.label23.Size = new System.Drawing.Size(101, 12);
		this.label23.TabIndex = 3;
		this.label23.Text = "MB时记录本地日志";
		this.nudMemoryLogLimit.Increment = new decimal(new int[4] { 10, 0, 0, 0 });
		this.nudMemoryLogLimit.Location = new System.Drawing.Point(99, 23);
		this.nudMemoryLogLimit.Maximum = new decimal(new int[4] { 10240, 0, 0, 0 });
		this.nudMemoryLogLimit.Minimum = new decimal(new int[4] { 10, 0, 0, 0 });
		this.nudMemoryLogLimit.Name = "nudMemoryLogLimit";
		this.nudMemoryLogLimit.Size = new System.Drawing.Size(50, 21);
		this.nudMemoryLogLimit.TabIndex = 2;
		this.nudMemoryLogLimit.Value = new decimal(new int[4] { 1024, 0, 0, 0 });
		this.cbAutoMemoryLog.AutoSize = true;
		this.cbAutoMemoryLog.Location = new System.Drawing.Point(3, 25);
		this.cbAutoMemoryLog.Name = "cbAutoMemoryLog";
		this.cbAutoMemoryLog.Size = new System.Drawing.Size(96, 16);
		this.cbAutoMemoryLog.TabIndex = 1;
		this.cbAutoMemoryLog.Text = "占用内存超过";
		this.cbAutoMemoryLog.UseVisualStyleBackColor = true;
		this.cbAutoDelayLog.AutoSize = true;
		this.cbAutoDelayLog.Location = new System.Drawing.Point(3, 3);
		this.cbAutoDelayLog.Name = "cbAutoDelayLog";
		this.cbAutoDelayLog.Size = new System.Drawing.Size(168, 16);
		this.cbAutoDelayLog.TabIndex = 0;
		this.cbAutoDelayLog.Text = "自动开启设备延迟本地日志";
		this.cbAutoDelayLog.UseVisualStyleBackColor = true;
		this.tabPage4.BackColor = System.Drawing.SystemColors.Control;
		this.tabPage4.Controls.Add(this.panel3);
		this.tabPage4.Location = new System.Drawing.Point(4, 22);
		this.tabPage4.Name = "tabPage4";
		this.tabPage4.Size = new System.Drawing.Size(442, 248);
		this.tabPage4.TabIndex = 2;
		this.tabPage4.Text = "其它设置";
		this.panel3.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.panel3.Controls.Add(this.label27);
		this.panel3.Controls.Add(this.nudRestartMemoryLimit);
		this.panel3.Controls.Add(this.cbAutoRestartByMemory);
		this.panel3.Controls.Add(this.label26);
		this.panel3.Controls.Add(this.nudRestartInterval);
		this.panel3.Controls.Add(this.cbAutoRestartByInterval);
		this.panel3.Controls.Add(this.nudPingDeviceTimeout);
		this.panel3.Controls.Add(this.label21);
		this.panel3.Controls.Add(this.label22);
		this.panel3.Controls.Add(this.nudMonitorGroupSize);
		this.panel3.Controls.Add(this.cbAutoMaximizeMonitor);
		this.panel3.Controls.Add(this.label8);
		this.panel3.Controls.Add(this.label7);
		this.panel3.Location = new System.Drawing.Point(20, 20);
		this.panel3.Name = "panel3";
		this.panel3.Size = new System.Drawing.Size(400, 222);
		this.panel3.TabIndex = 1;
		this.label27.AutoSize = true;
		this.label27.Location = new System.Drawing.Point(152, 111);
		this.label27.Name = "label27";
		this.label27.Size = new System.Drawing.Size(77, 12);
		this.label27.TabIndex = 18;
		this.label27.Text = "MB时重启程序";
		this.nudRestartMemoryLimit.Increment = new decimal(new int[4] { 10, 0, 0, 0 });
		this.nudRestartMemoryLimit.Location = new System.Drawing.Point(99, 107);
		this.nudRestartMemoryLimit.Maximum = new decimal(new int[4] { 10240, 0, 0, 0 });
		this.nudRestartMemoryLimit.Minimum = new decimal(new int[4] { 500, 0, 0, 0 });
		this.nudRestartMemoryLimit.Name = "nudRestartMemoryLimit";
		this.nudRestartMemoryLimit.Size = new System.Drawing.Size(50, 21);
		this.nudRestartMemoryLimit.TabIndex = 6;
		this.nudRestartMemoryLimit.Value = new decimal(new int[4] { 1024, 0, 0, 0 });
		this.cbAutoRestartByMemory.AutoSize = true;
		this.cbAutoRestartByMemory.Location = new System.Drawing.Point(3, 109);
		this.cbAutoRestartByMemory.Name = "cbAutoRestartByMemory";
		this.cbAutoRestartByMemory.Size = new System.Drawing.Size(96, 16);
		this.cbAutoRestartByMemory.TabIndex = 5;
		this.cbAutoRestartByMemory.Text = "占用内存超过";
		this.cbAutoRestartByMemory.UseVisualStyleBackColor = true;
		this.label26.AutoSize = true;
		this.label26.Location = new System.Drawing.Point(93, 83);
		this.label26.Name = "label26";
		this.label26.Size = new System.Drawing.Size(77, 12);
		this.label26.TabIndex = 15;
		this.label26.Text = "小时自动重启";
		this.nudRestartInterval.Location = new System.Drawing.Point(50, 80);
		this.nudRestartInterval.Maximum = new decimal(new int[4] { 720, 0, 0, 0 });
		this.nudRestartInterval.Minimum = new decimal(new int[4] { 1, 0, 0, 0 });
		this.nudRestartInterval.Name = "nudRestartInterval";
		this.nudRestartInterval.Size = new System.Drawing.Size(40, 21);
		this.nudRestartInterval.TabIndex = 4;
		this.nudRestartInterval.Value = new decimal(new int[4] { 24, 0, 0, 0 });
		this.cbAutoRestartByInterval.AutoSize = true;
		this.cbAutoRestartByInterval.Location = new System.Drawing.Point(3, 82);
		this.cbAutoRestartByInterval.Name = "cbAutoRestartByInterval";
		this.cbAutoRestartByInterval.Size = new System.Drawing.Size(48, 16);
		this.cbAutoRestartByInterval.TabIndex = 3;
		this.cbAutoRestartByInterval.Text = "每隔";
		this.cbAutoRestartByInterval.UseVisualStyleBackColor = true;
		this.nudPingDeviceTimeout.Increment = new decimal(new int[4] { 100, 0, 0, 0 });
		this.nudPingDeviceTimeout.Location = new System.Drawing.Point(124, 53);
		this.nudPingDeviceTimeout.Maximum = new decimal(new int[4] { 10000, 0, 0, 0 });
		this.nudPingDeviceTimeout.Minimum = new decimal(new int[4] { 100, 0, 0, 0 });
		this.nudPingDeviceTimeout.Name = "nudPingDeviceTimeout";
		this.nudPingDeviceTimeout.Size = new System.Drawing.Size(72, 21);
		this.nudPingDeviceTimeout.TabIndex = 2;
		this.nudPingDeviceTimeout.Value = new decimal(new int[4] { 1000, 0, 0, 0 });
		this.label21.AutoSize = true;
		this.label21.Location = new System.Drawing.Point(203, 55);
		this.label21.Name = "label21";
		this.label21.Size = new System.Drawing.Size(17, 12);
		this.label21.TabIndex = 12;
		this.label21.Text = "ms";
		this.label22.AutoSize = true;
		this.label22.Location = new System.Drawing.Point(2, 55);
		this.label22.Name = "label22";
		this.label22.Size = new System.Drawing.Size(119, 12);
		this.label22.TabIndex = 10;
		this.label22.Text = "Ping设备的Timeout：";
		this.nudMonitorGroupSize.Location = new System.Drawing.Point(93, 26);
		this.nudMonitorGroupSize.Maximum = new decimal(new int[4] { 99, 0, 0, 0 });
		this.nudMonitorGroupSize.Name = "nudMonitorGroupSize";
		this.nudMonitorGroupSize.Size = new System.Drawing.Size(35, 21);
		this.nudMonitorGroupSize.TabIndex = 1;
		this.cbAutoMaximizeMonitor.AutoSize = true;
		this.cbAutoMaximizeMonitor.Location = new System.Drawing.Point(3, 3);
		this.cbAutoMaximizeMonitor.Name = "cbAutoMaximizeMonitor";
		this.cbAutoMaximizeMonitor.Size = new System.Drawing.Size(144, 16);
		this.cbAutoMaximizeMonitor.TabIndex = 0;
		this.cbAutoMaximizeMonitor.Text = "数据监控窗口自动全屏";
		this.cbAutoMaximizeMonitor.UseVisualStyleBackColor = true;
		this.label8.AutoSize = true;
		this.label8.Location = new System.Drawing.Point(131, 30);
		this.label8.Name = "label8";
		this.label8.Size = new System.Drawing.Size(65, 12);
		this.label8.TabIndex = 3;
		this.label8.Text = "个点位一组";
		this.label7.AutoSize = true;
		this.label7.Location = new System.Drawing.Point(1, 30);
		this.label7.Name = "label7";
		this.label7.Size = new System.Drawing.Size(89, 12);
		this.label7.TabIndex = 1;
		this.label7.Text = "数据监控窗口每";
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(474, 397);
		base.Controls.Add(this.tcSettings);
		base.Controls.Add(this.cbAutoMinimized);
		base.Controls.Add(this.btnConfirm);
		base.Controls.Add(this.btnCancel);
		base.Controls.Add(this.cbAutoRun);
		base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
		base.MaximizeBox = false;
		base.MinimizeBox = false;
		base.Name = "SettingForm";
		this.Text = "设置";
		base.Load += new System.EventHandler(SettingForm_Load);
		base.KeyDown += new System.Windows.Forms.KeyEventHandler(SettingForm_KeyDown);
		this.tcSettings.ResumeLayout(false);
		this.tabPage1.ResumeLayout(false);
		this.panel1.ResumeLayout(false);
		this.panel1.PerformLayout();
		((System.ComponentModel.ISupportInitialize)this.nudTaskTimeout).EndInit();
		this.tabPage2.ResumeLayout(false);
		this.panel2.ResumeLayout(false);
		this.panel2.PerformLayout();
		((System.ComponentModel.ISupportInitialize)this.nudGetMemoryInterval).EndInit();
		this.groupBox4.ResumeLayout(false);
		this.groupBox4.PerformLayout();
		((System.ComponentModel.ISupportInitialize)this.nudOPCUAKeepAliveInterval).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudSocketClientKeepAliveInterval).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudGCInterval).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudBAKInterval).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudMonitorInterval).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudPingDeviceInterval).EndInit();
		this.tabPage3.ResumeLayout(false);
		this.panel4.ResumeLayout(false);
		this.panel4.PerformLayout();
		((System.ComponentModel.ISupportInitialize)this.nudLogLifetime).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudLogLimitCount).EndInit();
		this.gbConnStr.ResumeLayout(false);
		this.gbConnStr.PerformLayout();
		((System.ComponentModel.ISupportInitialize)this.nudMemoryLogLimit).EndInit();
		this.tabPage4.ResumeLayout(false);
		this.panel3.ResumeLayout(false);
		this.panel3.PerformLayout();
		((System.ComponentModel.ISupportInitialize)this.nudRestartMemoryLimit).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudRestartInterval).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudPingDeviceTimeout).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudMonitorGroupSize).EndInit();
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
